;; -*- mode: emacs-lisp; coding: gbk-dos; file: .emacs .emacs.el .emacs.d/init.el -*-
;; Daniel Shen <edaniel.shen@gmail.com>

(setq debug-on-error nil)

;; setup emacs server 1st
(setq server-use-tcp t)
;;(setq server-host "PC746")
(setq server-raise-frame t)
(add-hook 'after-init-hook 'server-start)

(setq my-emacs-path "~/iconfig/emacs/")
(setq my-emacs-conf-path "~/.emacs.d/tdata/")

(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
    (let* ((my-lisp-dir (concat my-emacs-path "site-lisp/"))
           (default-directory my-lisp-dir))
      (setq load-path (cons my-lisp-dir load-path))
      (normal-top-level-add-subdirs-to-load-path)))

(mapc 'load (directory-files (concat my-emacs-path "etc/") t "\\.el\\'"))

(when (eq window-system 'w32)
  (mapc 'load (directory-files (concat my-emacs-path "etc/w32/") t "\\.el\\'"))
  )

(when (eq window-system 'x)
  (mapc 'load (directory-files (concat my-emacs-path "etc/x11/") t "\\.el\\'"))
  )


